package com.zero.insp.services;

import com.zero.insp.views.User;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

@Service
public class PermService {

    private static Map<String, Set<String>> perms = new HashMap<>();

    static {
        Set<String> hperms = new HashSet<>();
        hperms.add("search:all");
        hperms.add("insp:edit");

        perms.put("高级用户", hperms);
    }

    public Set<String> getPermsByUserId(User user){

        return perms.get(user.getType());
    }
}
